
#pragma once
#include <string>
#include <iostream>

namespace fs {

	class Path {
		std::string _path;
		
		Path& canonicalize();
	public:
		Path();
		explicit Path( const std::string & other );
		Path( const Path & other );
		Path & operator=( const Path & other );

		std::string as_string( bool trailing_backslash_flag = false ) const;

		bool is_directory( ) const;
		bool is_exist() const;
		std::string extension() const;
		static Path current_directory();

		void swap( Path other ) throw();

		Path & operator+=( const Path & other );
		bool operator==( const Path & other );
		bool operator!=( const Path & other );
		friend Path operator+( const Path & path1, const Path & path2 );
		friend std::ostream & operator<<( std::ostream & os, const Path & path );
		friend std::istream & operator>>( std::istream & is, Path & path );
		operator std::string();
		
	};
}